Skip to content

Backtracking tests and moving modules around for better organization#36

Open
wli51 wants to merge 17 commits into
WayScience:mainfrom
wli51:block-refactor-pre
Open

Backtracking tests and moving modules around for better organization#36
wli51 wants to merge 17 commits into
WayScience:mainfrom
wli51:block-refactor-pre

Conversation

@wli51

@wli51 wli51 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR primes a series of future refactors whose collective goal would be improving readability and expand-ability of models, and ultimately laying foundation for future feature addition of allowing conditioning by a separate variable while computing convolutions on images/feature maps (conditioning is required for diffusion modelling).

This PR does the following:

  1. back-track tests to contract correct behavior of compute and up/down sampling blocks
  2. Move block modules under new blocks sub package without changing behavior, adjust imports

@wli51
wli51 requested a review from MattsonCam July 23, 2026 16:52

@MattsonCam MattsonCam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding these tests was a great idea—nice work! I don't see anything in the implementation that looks likely to introduce regressions, and the tests look reasonable.

I did notice that some of the import paths have changed due to the code being moved in this pr. I think this may break 1.modular_unet_example in the examples folder. It might also be worth creating versioned releases (or tags) for this repository so users can pin a specific version when training virtual staining models, especially as the API evolves.

wli51 added 4 commits July 24, 2026 12:51
…taset

- Replaced PatchDataset with CropImageDataset and BaseImageDataset for improved data handling.
- Updated data loading logic to accommodate new dataset structure.
- Adjusted visualization code to reflect changes in dataset and patch generation.
- Renumbered notebook cells for clarity and consistency.
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@wli51

wli51 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

I did notice that some of the import paths have changed due to the code being moved in this pr. I think this may break 1.modular_unet_example in the examples folder

Great call here, i have added a compatibility shim to prevent breaking API changes in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants